import assessCheckApi from './api'
import { axios } from '@/utils/request'

// 流程列表-分页查询
export function list(params){
  return axios({
    url: assessCheckApi.list,
    method:'get',
    params:{...params},
    url_2:'outside',
  })
}
// 初始化
export function initBzFlow(data){
    return axios({
        url: assessCheckApi.initBzFlow,
        method:'post',
        data:{...data},
        url_2:'outside',
    })
}
// 保存接口
export function saveFlow(data){
    return axios({
        url: assessCheckApi.saveFlow,
        method:'post',
        data:{...data},
        url_2:'outside',
    })
}
// 提交接口
export function submitFlow(data){
    return axios({
        url: assessCheckApi.submitFlow,
        method:'post',
        data:{...data},
        url_2:'outside',
    })
}
// 修订提交
export function editFuntion(data){
    return axios({
        url: assessCheckApi.editFuntion,
        method:'put',
        data:{...data},
        url_2:'outside',
    })
}
// 查询当前流程任务详情-通过当前流程任务id
export function queryJobByJobId(params){
    return axios({
        url: assessCheckApi.queryJobByJobId,
        method:'get',
        params:{...params},
        url_2:'outside',
    })
}
// 自定义-退回环节
export function returnUpperzdyFlowJob(data){
    return axios({
        url: assessCheckApi.returnUpperzdyFlowJob,
        method:'post',
        data:{...data},
        url_2:'outside',
    })
}
// 流程监控-分页查询
export function flowJkPage(params){
    return axios({
        url: assessCheckApi.flowJkPage,
        method:'get',
        params:{...params},
        url_2:'outside',
    })
}
// 下载个人签名
export function downMyQm(params){
    return axios({
        url: assessCheckApi.downMyQm,
        method:'get' ,
        params:{...params},
        url_1:'outside',
        responseType: 'arraybuffer'
    })
}

// 下载个人签名
export function getMoreUserSignLinkList(params){
    return axios({
        url: assessCheckApi.getMoreUserSignLinkList,
        method:'get' ,
        params:{...params},
        url_1:'outside',
        // responseType: 'arraybuffer',
    })
}

//
export function pidgetlchj(params){
    return axios({
        url: assessCheckApi.pidgetlchj,
        method:'get' ,
        params:{...params},
        url_2:'outside',
    })
}

// minio-OA-上传附件
export function fjupload(data){
    return axios({
      url: assessCheckApi.fjupload,
      method:'post' ,
      data:data,
      url_2:'outside',
      // responseType: 'arraybuffer'
    })
  }
  // OA附件资源库-编辑
  export function fjedit(data){
    return axios({
      url: assessCheckApi.fjedit,
      method:'put' ,
      data:{...data},
      url_2:'outside',
    })
  }
  // 附件删除
  export function deleleMinioFile(params){
    return axios({
      url: assessCheckApi.deleleMinioFile,
      method:'get' ,
      params:{...params},
      url_2:'outside',
    })
  }
  // OA-打开文档-服务端-只读
  export function openFile(params){
    return axios({
      url: assessCheckApi.openFile,
      method:'get' ,
      params:{...params},
      url_2:'outside',
    })
  }
  // minio-下载附件
  export function downLoadOa(params){
    return axios({
      url: assessCheckApi.downLoadOa,
      method:'get' ,
      params:{...params},
      url_2:'outside',
      responseType: 'arraybuffer'
    })
  }
  // OA附件资源库-分页列表查询
  export function fjlist(params){
    return axios({
      url: assessCheckApi.fjlist,
      method:'get' ,
      params:{...params},
      url_2:'outside',
    })
  }
  // 流程业务主表-添加
export function fjAdd(data){
    return axios({
      url: assessCheckApi.fjAdd,
      method:'post' ,
      data:data,
      url_2:'outside',
    })
  }
